package model

import (
	"gorm.io/datatypes"
)

type Entity struct {
	Id                 uint64         `json:"id" gorm:"column:id"`
	Name               string         `json:"name" gorm:"column:name"`
	Code               string         `json:"code" gorm:"column:code"`
	TenantId           int64          `json:"tenant_id" gorm:"column:tenant_id"`
	ProjectId          int64          `json:"project_id" gorm:"column:project_id"`
	ModuleId           int64          `json:"module_id" gorm:"column:module_id"`
	Description        string         `json:"description" gorm:"column:description"`
	IsAssignee         string         `json:"is_assignee" gorm:"column:is_assignee"`
	CategoryId         int64          `json:"category_id" gorm:"column:category_id"`
	StepWorkflowId     int64          `json:"step_workflow_id" gorm:"column:step_workflow_id"`
	EntityId           int64          `json:"entity_id" gorm:"column:entity_id"`
	InitialEpisodeCode string         `json:"initial_episode_code" gorm:"column:initial_episode_code"`
	EntityModuleId     int64          `json:"entity_module_id" gorm:"column:entity_module_id"`
	StartTime          int64          `json:"start_time" gorm:"column:start_time"`
	EndTime            int64          `json:"end_time" gorm:"column:end_time"`
	Duration           string         `json:"duration" gorm:"column:duration"`
	CreatedBy          int64          `json:"created_by" gorm:"column:created_by"`
	Created            int64          `json:"created" gorm:"column:created"`
	Uuid               string         `json:"uuid" gorm:"column:uuid"`
	ShowingsNumber     string         `json:"showings_number" gorm:"column:showings_number"`
	Json               datatypes.JSON `json:"json" gorm:"column:json"`
	EpisodeIsSeal      string         `json:"episode_is_seal"`
	EpisodeIsShow      string         `json:"episode_is_show"`
	Remark             string         `json:"remark" gorm:"column:remark"`
	PlanStartTime      string         `json:"plan_start_time" gorm:"column:plan_start_time"`
}

// 设置表名
func (Entity) TableName() string {
	return "entity"
}

type DesignJson struct {
	DesignMedia            string `json:"design_media"`
	DesignGrade            string `json:"design_grade"`
	DesignBindingAttribute string `json:"design_binding_attribute"`
	DesignCategory         string `json:"design_category"`
	DesignPerformSpecies   string `json:"design_perform_species"`
	DesignTimeOfDate       string `json:"design_time_of_date"`
	DesignStatus           string `json:"design_status"`
	DesignWeather          string `json:"design_weather"`
}

type AssetJson struct {
	AssetSpecialEffectType string      `json:"asset_special_effect_type"`
	AssetGrade             string      `json:"asset_grade"`
	AssetWeather           string      `json:"asset_weather"`
	AssetDesignSource      interface{} `json:"asset_design"`
	AssetIsNeedBind        string      `json:"asset_is_need_bind"`
	AssetTimeOfDate        string      `json:"asset_time_of_date"`
	AssetStatusSource      interface{} `json:"asset_status"` // 类型不确定
	AssetCategory          string      `json:"asset_category"`
	AssetStyle             string      `json:"asset_style"`
	AssetAsset             string      `json:"asset_asset"`
	AssetBindingAttribute  string      `json:"asset_binding_attribute"`
	AssetPerformSpecies    string      `json:"asset_perform_species"`
	AssetLevel             string      `json:"asset_level"`
}

type LevelJson struct {
	LevelAsset        string      `json:"level_asset"`
	LevelDesignSource interface{} `json:"level_design"` // 类型不确定
	LevelGrade        string      `json:"level_grade"`
	LevelStyle        string      `json:"level_style"`
	LevelCategory     string      `json:"level_category"`
	LevelStatus       interface{} `json:"level_status"` // 类型不确定
}

type SequenceJson struct {
	SequenceProductionMethod string `json:"sequence_production_method"`
	SequenceAsset            string `json:"sequence_asset"`
	SequenceStyle            string `json:"sequence_style"`
	SequencePerformNumbers   string `json:"sequence_perform_numbers"`
	SequencePerformForm      string `json:"sequence_perform_form"`
	SequenceStatus           string `json:"sequence_status"`
	SequenceLevel            string `json:"sequence_level"`
	SequencePerformSpecies   string `json:"sequence_perform_species"`
	SequenceClothSolution    string `json:"sequence_cloth_solution"`
	SequenceDuration         string `json:"sequence_duration"`
}

type ShotJson struct {
	ShotAsset            string      `json:"shot_asset"`
	ShotDuration         string      `json:"shot_duration"`
	ShotLevel            string      `json:"shot_level"`
	ShotPerformForm      string      `json:"shot_perform_form"`
	ShotPerformNumbers   string      `json:"shot_perform_numbers"`
	ShotPerformSpecies   string      `json:"shot_perform_species"`
	ShotProductionMethod string      `json:"shot_production_method"`
	ShotShowingsNumber   string      `json:"shot_showings_number"`
	ShotStatus           interface{} `json:"shot_status"`
	ShotStoryboard       string      `json:"shot_storyboard"`
	ShotStyle            string      `json:"shot_style"`
	ShotType             string      `json:"shot_type"`
}

type EpisodeJson struct {
	EpisodePlanSealTime int64  `json:"episode_plan_seal_time"` // 剧集计划封板时间
	EpisodePlanShowTime int64  `json:"episode_plan_show_time"` // 剧集计划播出时间
	EpisodeSealTime     int64  `json:"episode_seal_time"`      // 剧集封板时间
	EpisodeShowTime     int64  `json:"episode_show_time"`      // 剧集播出时间
	EpisodeCustomGrade  string `json:"episode_custom_grade"`   // 剧集自定义等级
}

type Shot struct {
	Entity
	ShotJson
}

type Episode struct {
	Entity
	EpisodeJson
}
